.class public Lcom/htc/android/footprints/activity/FootprintCamera;
.super Landroid/app/Activity;
.source "FootprintCamera.java"

# interfaces
.implements Landroid/view/SurfaceHolder$Callback;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/htc/android/footprints/activity/FootprintCamera$JpegPictureCallback;,
        Lcom/htc/android/footprints/activity/FootprintCamera$ShutterCallback;,
        Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;
    }
.end annotation


# static fields
.field private static final BRIGHTNESS_BAR_TIME:I = 0xbb8

.field private static final FIRST_LAUNCH_DIALOG:I = 0x0

.field private static final LOCATION_SOURCE_DISABLED_DIALOG:I = 0x1

.field private static MENU_ADJUST_BRIGHT:I = 0x0

.field private static MENU_ADJUST_WHITE_BALANCE:I = 0x0

.field private static MENU_ALL_FOOTPRINTS:I = 0x0

.field private static final RECAP_NONE:I = 0x0

.field private static final SELECT_WHITE_BALANCE_DIALOG:I = 0x2

.field private static final SERVICE_BINDED:I = 0x2

.field private static final SERVICE_BINDING:I = 0x1

.field private static final SERVICE_UNBIND:I = 0x0

.field private static final S_COMPLETED:I = 0x5

.field private static final S_FOCUSED:I = 0x3

.field private static final S_FOCUSING:I = 0x2

.field private static final S_IDLE:I = 0x0

.field private static final S_PREVIEW:I = 0x1

.field private static final S_SNAPSHOT:I = 0x4

.field private static final TAG:Ljava/lang/String; = "FootprintCamera"

.field private static whiteBalanceDefaultIndex:I


# instance fields
.field private backFromSettings:Z

.field private gpsEnabled:Z

.field private gpsText:Landroid/widget/TextView;

.field indicatorFlag:Z

.field private isForceSnap:Z

.field private isLanuchByWidget:Z

.field private isRecaputre:I

.field private mAddress:Ljava/lang/String;

.field private mBindState:I

.field private mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

.field private mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

.field private mCameraDevice:Landroid/hardware/Camera;

.field private mCheckBgHandler:Landroid/os/Handler;

.field private mConnection:Landroid/content/ServiceConnection;

.field private mFixLocation:Landroid/location/Location;

.field private mFixNetwork:Landroid/location/Location;

.field private mHandler:Landroid/os/Handler;

.field private mImageCapture:Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

.field private mIndicator:Landroid/widget/ImageView;

.field private mNote:Ljava/lang/String;

.field private mPhone:Ljava/lang/String;

.field private mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

.field mService:Lcom/htc/android/footprints/ILocationAgentService;

.field private mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

.field private mStatus:I

.field private mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

.field private mSurfaceView:Landroid/view/SurfaceView;

.field private mTitle:Ljava/lang/String;

.field private mUrl:Ljava/lang/String;

.field public resetBrightnessPanel:Ljava/lang/Runnable;

.field private takeButton:Landroid/widget/ImageView;

.field private whiteBalanceItems:[Ljava/lang/CharSequence;

.field private whiteBalanceSelectionListener:Landroid/content/DialogInterface$OnClickListener;

.field private whiteBalanceSettings:[Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 317
    sput v1, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ALL_FOOTPRINTS:I

    .line 318
    const/4 v0, 0x1

    sput v0, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_WHITE_BALANCE:I

    .line 319
    const/4 v0, 0x2

    sput v0, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_BRIGHT:I

    .line 783
    sput v1, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceDefaultIndex:I

    return-void
.end method

.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 61
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 71
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    .line 79
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mImageCapture:Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

    .line 81
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    .line 82
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mTitle:Ljava/lang/String;

    .line 83
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mAddress:Ljava/lang/String;

    .line 84
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mPhone:Ljava/lang/String;

    .line 85
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mUrl:Ljava/lang/String;

    .line 86
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mNote:Ljava/lang/String;

    .line 87
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixLocation:Landroid/location/Location;

    .line 88
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixNetwork:Landroid/location/Location;

    .line 89
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    .line 90
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCheckBgHandler:Landroid/os/Handler;

    .line 91
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isLanuchByWidget:Z

    .line 92
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->backFromSettings:Z

    .line 99
    iput v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    .line 100
    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    .line 784
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSettings:[Ljava/lang/String;

    .line 785
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceItems:[Ljava/lang/CharSequence;

    .line 786
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSelectionListener:Landroid/content/DialogInterface$OnClickListener;

    .line 853
    new-instance v0, Lcom/htc/android/footprints/activity/FootprintCamera$7;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$7;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel:Ljava/lang/Runnable;

    .line 862
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    .line 863
    new-instance v0, Lcom/htc/android/footprints/activity/FootprintCamera$8;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$8;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mConnection:Landroid/content/ServiceConnection;

    .line 910
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->indicatorFlag:Z

    .line 911
    new-instance v0, Lcom/htc/android/footprints/activity/FootprintCamera$9;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$9;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    return-void
.end method

.method static synthetic access$000(Lcom/htc/android/footprints/activity/FootprintCamera;Z)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/FootprintCamera;->takePicture(Z)V

    return-void
.end method

.method static synthetic access$100(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/widget/ImageView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    return-object v0
.end method

.method static synthetic access$1000(Lcom/htc/android/footprints/activity/FootprintCamera;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mPhone:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$1100(Lcom/htc/android/footprints/activity/FootprintCamera;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mUrl:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$1200(Lcom/htc/android/footprints/activity/FootprintCamera;)Lcom/htc/android/footprints/vo/Category;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    return-object v0
.end method

.method static synthetic access$1300(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/hardware/Camera;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    return-object v0
.end method

.method static synthetic access$1602(Lcom/htc/android/footprints/activity/FootprintCamera;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    iput p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    return p1
.end method

.method static synthetic access$1700(Lcom/htc/android/footprints/activity/FootprintCamera;)Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mImageCapture:Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

    return-object v0
.end method

.method static synthetic access$1800(Lcom/htc/android/footprints/activity/FootprintCamera;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isForceSnap:Z

    return v0
.end method

.method static synthetic access$1900(Lcom/htc/android/footprints/activity/FootprintCamera;)Lcom/htc/android/footprints/utils/SoundPlayer;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    return-object v0
.end method

.method static synthetic access$2002(I)I
    .locals 0
    .parameter "x0"

    .prologue
    .line 61
    sput p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceDefaultIndex:I

    return p0
.end method

.method static synthetic access$2100(Lcom/htc/android/footprints/activity/FootprintCamera;)[Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSettings:[Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$2200(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/os/Handler;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$2300(Lcom/htc/android/footprints/activity/FootprintCamera;)Lcom/htc/android/footprints/view/BrightnessPanel;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    return-object v0
.end method

.method static synthetic access$2402(Lcom/htc/android/footprints/activity/FootprintCamera;I)I
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    iput p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    return p1
.end method

.method static synthetic access$2500(Lcom/htc/android/footprints/activity/FootprintCamera;)Lcom/htc/android/footprints/ILocationAgentCallback;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    return-object v0
.end method

.method static synthetic access$2600(Lcom/htc/android/footprints/activity/FootprintCamera;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    return v0
.end method

.method static synthetic access$2700(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/widget/ImageView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    return-object v0
.end method

.method static synthetic access$2800(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/widget/TextView;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsText:Landroid/widget/TextView;

    return-object v0
.end method

.method static synthetic access$302(Lcom/htc/android/footprints/activity/FootprintCamera;Z)Z
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    iput-boolean p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->backFromSettings:Z

    return p1
.end method

.method static synthetic access$400(Lcom/htc/android/footprints/activity/FootprintCamera;)I
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isRecaputre:I

    return v0
.end method

.method static synthetic access$500(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/location/Location;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixLocation:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$502(Lcom/htc/android/footprints/activity/FootprintCamera;Landroid/location/Location;)Landroid/location/Location;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    iput-object p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixLocation:Landroid/location/Location;

    return-object p1
.end method

.method static synthetic access$600(Lcom/htc/android/footprints/activity/FootprintCamera;)Z
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-boolean v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isLanuchByWidget:Z

    return v0
.end method

.method static synthetic access$700(Lcom/htc/android/footprints/activity/FootprintCamera;)Landroid/location/Location;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixNetwork:Landroid/location/Location;

    return-object v0
.end method

.method static synthetic access$702(Lcom/htc/android/footprints/activity/FootprintCamera;Landroid/location/Location;)Landroid/location/Location;
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 61
    iput-object p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mFixNetwork:Landroid/location/Location;

    return-object p1
.end method

.method static synthetic access$800(Lcom/htc/android/footprints/activity/FootprintCamera;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mTitle:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$900(Lcom/htc/android/footprints/activity/FootprintCamera;)Ljava/lang/String;
    .locals 1
    .parameter "x0"

    .prologue
    .line 61
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mAddress:Ljava/lang/String;

    return-object v0
.end method

.method private autoFocus()V
    .locals 2

    .prologue
    .line 635
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 636
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    new-instance v1, Lcom/htc/android/footprints/activity/FootprintCamera$5;

    invoke-direct {v1, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$5;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->autoFocus(Landroid/hardware/Camera$AutoFocusCallback;)V

    .line 656
    :cond_0
    return-void
.end method

.method private bindLocationAgentService()V
    .locals 4

    .prologue
    const/4 v3, 0x1

    .line 103
    const-string v1, "FootprintCamera"

    const-string v2, "bind LocationAgentService. mBindState = SERVICE_BINDING"

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 104
    iput v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    .line 106
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    .line 107
    .local v0, intent:Landroid/content/Intent;
    const-class v1, Lcom/htc/android/footprints/service/LocationAgentService;

    invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    .line 108
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mConnection:Landroid/content/ServiceConnection;

    invoke-virtual {p0, v0, v1, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->bindService(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z

    .line 109
    return-void
.end method

.method private calculatePicturesRemaining()I
    .locals 9

    .prologue
    .line 674
    const/4 v1, -0x1

    .line 675
    .local v1, NO_STORAGE_ERROR:I
    const/4 v0, -0x2

    .line 688
    .local v0, CANNOT_STAT_ERROR:I
    move v4, v1

    .line 690
    .local v4, result:I
    :try_start_0
    invoke-static {}, Lcom/htc/android/footprints/activity/FootprintCamera;->hasExternalStorage()Z

    move-result v7

    if-eqz v7, :cond_0

    .line 691
    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v7

    invoke-virtual {v7}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v6

    .line 693
    .local v6, storageDirectory:Ljava/lang/String;
    new-instance v5, Landroid/os/StatFs;

    invoke-direct {v5, v6}, Landroid/os/StatFs;-><init>(Ljava/lang/String;)V

    .line 694
    .local v5, stat:Landroid/os/StatFs;
    invoke-virtual {v5}, Landroid/os/StatFs;->getAvailableBlocks()I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {v5}, Landroid/os/StatFs;->getBlockSize()I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v8

    int-to-float v8, v8

    mul-float/2addr v7, v8

    const v8, 0x48c35000

    div-float v3, v7, v8

    .line 696
    .local v3, remaining:F
    float-to-int v4, v3

    .line 702
    .end local v3           #remaining:F
    .end local v5           #stat:Landroid/os/StatFs;
    .end local v6           #storageDirectory:Ljava/lang/String;
    :cond_0
    :goto_0
    return v4

    .line 698
    :catch_0
    move-exception v7

    move-object v2, v7

    .line 699
    .local v2, ex:Ljava/lang/Exception;
    const-string v7, "FootprintCamera"

    invoke-virtual {v2}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 700
    move v4, v0

    goto :goto_0
.end method

.method private checkInBackground()V
    .locals 4

    .prologue
    .line 444
    const-string v0, "FootprintCamera"

    const-string v1, "checkInBackground"

    invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    .line 445
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCheckBgHandler:Landroid/os/Handler;

    new-instance v1, Lcom/htc/android/footprints/activity/FootprintCamera$4;

    invoke-direct {v1, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$4;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    const-wide/16 v2, 0x4e20

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 462
    return-void
.end method

.method private checkLocationSources()V
    .locals 4

    .prologue
    .line 429
    const-string v2, "location"

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/location/LocationManager;

    .line 430
    .local v1, service:Landroid/location/LocationManager;
    const-string v2, "gps"

    invoke-virtual {v1, v2}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v2

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    .line 431
    const-string v2, "network"

    invoke-virtual {v1, v2}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v0

    .line 432
    .local v0, networkEnabled:Z
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    if-nez v2, :cond_0

    .line 433
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsText:Landroid/widget/TextView;

    const v3, 0x7f0a0014

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 434
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    const/4 v3, 0x6

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageLevel(I)V

    .line 436
    :cond_0
    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v2

    iget-boolean v2, v2, Lcom/htc/android/footprints/utils/SettingInfo;->showLocationDisabledAlert:Z

    if-eqz v2, :cond_2

    .line 437
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    if-eqz v2, :cond_1

    if-nez v0, :cond_2

    .line 438
    :cond_1
    const/4 v2, 0x1

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->showDialog(I)V

    .line 441
    :cond_2
    return-void
.end method

.method private createWhiteBalanceMenu()V
    .locals 8

    .prologue
    const/4 v7, 0x4

    const/4 v6, 0x3

    const/4 v5, 0x1

    const/4 v4, 0x0

    const/4 v3, 0x2

    .line 790
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSettings:[Ljava/lang/String;

    if-nez v0, :cond_0

    .line 791
    const/4 v0, 0x7

    new-array v0, v0, [Ljava/lang/String;

    const-string v1, "auto"

    aput-object v1, v0, v4

    const-string v1, "incandescent"

    aput-object v1, v0, v5

    const-string v1, "fluorescent"

    aput-object v1, v0, v3

    const-string v1, "daylight"

    aput-object v1, v0, v6

    const-string v1, "cloudy"

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const-string v2, "twilight"

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const-string v2, "shade"

    aput-object v2, v0, v1

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSettings:[Ljava/lang/String;

    .line 800
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceItems:[Ljava/lang/CharSequence;

    if-nez v0, :cond_1

    .line 801
    const/4 v0, 0x7

    new-array v0, v0, [Ljava/lang/CharSequence;

    const v1, 0x7f0a0085

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v4

    const v1, 0x7f0a0086

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v5

    const v1, 0x7f0a0087

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v3

    const v1, 0x7f0a0088

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v6

    const v1, 0x7f0a0089

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    aput-object v1, v0, v7

    const/4 v1, 0x5

    const v2, 0x7f0a008a

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v2

    aput-object v2, v0, v1

    const/4 v1, 0x6

    const v2, 0x7f0a008b

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v2

    aput-object v2, v0, v1

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceItems:[Ljava/lang/CharSequence;

    .line 811
    :cond_1
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSelectionListener:Landroid/content/DialogInterface$OnClickListener;

    if-nez v0, :cond_2

    .line 812
    new-instance v0, Lcom/htc/android/footprints/activity/FootprintCamera$6;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$6;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSelectionListener:Landroid/content/DialogInterface$OnClickListener;

    .line 827
    :cond_2
    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->showDialog(I)V

    .line 828
    return-void
.end method

.method public static hasExternalStorage()Z
    .locals 2

    .prologue
    .line 664
    invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;

    move-result-object v0

    .line 665
    .local v0, state:Ljava/lang/String;
    const-string v1, "mounted"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    return v1
.end method

.method private innerUnbindLocationAgentService(Z)V
    .locals 3
    .parameter "needShutdownAgent"

    .prologue
    .line 113
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_0

    .line 114
    const-string v1, "FootprintCamera"

    const-string v2, "removeCallback"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 115
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    invoke-interface {v1, v2}, Lcom/htc/android/footprints/ILocationAgentService;->removeCallback(Lcom/htc/android/footprints/ILocationAgentCallback;)Z

    .line 116
    if-eqz p1, :cond_0

    .line 117
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v1}, Lcom/htc/android/footprints/ILocationAgentService;->shutdownAgent()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 123
    :cond_0
    :goto_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mConnection:Landroid/content/ServiceConnection;

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->unbindService(Landroid/content/ServiceConnection;)V

    .line 124
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    .line 125
    const/4 v1, 0x0

    iput v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    .line 126
    return-void

    .line 120
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 121
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method private takePicture(Z)V
    .locals 2
    .parameter "force"

    .prologue
    .line 465
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    .line 466
    iput-boolean p1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isForceSnap:Z

    .line 467
    const/4 v0, 0x2

    iput v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    .line 468
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/SoundPlayer;->prepareCarmerFocusing()V

    .line 469
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    invoke-virtual {v0}, Lcom/htc/android/footprints/utils/SoundPlayer;->play()V

    .line 470
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->autoFocus()V

    .line 472
    :cond_0
    return-void
.end method

.method private unbindLocationAgentService(Z)V
    .locals 3
    .parameter "needShutdownAgent"

    .prologue
    const-string v2, "FootprintCamera"

    .line 129
    const-string v0, "FootprintCamera"

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "unbind LocationAgentService. mBindState = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 130
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    .line 132
    const-string v0, "FootprintCamera"

    const-string v0, "LocationAgentService is still in binding. but user call unbind"

    invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 134
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/FootprintCamera;->innerUnbindLocationAgentService(Z)V

    .line 140
    :cond_0
    :goto_0
    return-void

    .line 135
    :cond_1
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_2

    .line 136
    invoke-direct {p0, p1}, Lcom/htc/android/footprints/activity/FootprintCamera;->innerUnbindLocationAgentService(Z)V

    goto :goto_0

    .line 137
    :cond_2
    iget v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBindState:I

    if-nez v0, :cond_0

    .line 138
    const-string v0, "FootprintCamera"

    const-string v0, "LocationAgentService is not bind. but user call unbind"

    invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method


# virtual methods
.method public closeBrightnessPanel()V
    .locals 3

    .prologue
    .line 846
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel:Ljava/lang/Runnable;

    invoke-virtual {v1, v2}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 847
    const v1, 0x7f040006

    invoke-static {p0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v0

    .line 848
    .local v0, pushupout:Landroid/view/animation/Animation;
    const-wide/16 v1, 0x96

    invoke-virtual {v0, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 849
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    invoke-virtual {v1, v0}, Lcom/htc/android/footprints/view/BrightnessPanel;->startAnimation(Landroid/view/animation/Animation;)V

    .line 850
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Lcom/htc/android/footprints/view/BrightnessPanel;->setVisibility(I)V

    .line 851
    return-void
.end method

.method public finish()V
    .locals 1

    .prologue
    .line 1020
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 1021
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    .line 1022
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->release()V

    .line 1023
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    .line 1025
    :cond_0
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    .line 1026
    invoke-super {p0}, Landroid/app/Activity;->finish()V

    .line 1027
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 7
    .parameter "savedInstanceState"

    .prologue
    const/4 v5, 0x0

    const-string v6, "FootprintCamera"

    .line 144
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 145
    const/4 v3, 0x1

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->requestWindowFeature(I)Z

    .line 146
    const/4 v3, 0x2

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->requestWindowFeature(I)Z

    .line 147
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->getWindow()Landroid/view/Window;

    move-result-object v3

    const/16 v4, 0x80

    invoke-virtual {v3, v4}, Landroid/view/Window;->clearFlags(I)V

    .line 149
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->getIntent()Landroid/content/Intent;

    move-result-object v0

    .line 150
    .local v0, activityIntent:Landroid/content/Intent;
    const-string v3, "CATEGORY"

    invoke-virtual {v0, v3}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v3

    check-cast v3, Lcom/htc/android/footprints/vo/Category;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    .line 152
    const-string v3, "FootprintCamera"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "get category from parcel"

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSelectedCategory:Lcom/htc/android/footprints/vo/Category;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v6, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 154
    const v3, 0x7f03000d

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->setContentView(I)V

    .line 156
    const v3, 0x7f0c0056

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/view/SurfaceView;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    .line 157
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    invoke-virtual {v3}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v1

    .line 158
    .local v1, holder:Landroid/view/SurfaceHolder;
    invoke-interface {v1, p0}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V

    .line 159
    const/4 v3, 0x3

    invoke-interface {v1, v3}, Landroid/view/SurfaceHolder;->setType(I)V

    .line 160
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    invoke-virtual {v3}, Landroid/view/SurfaceView;->getKeepScreenOn()Z

    move-result v3

    if-eqz v3, :cond_0

    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    invoke-virtual {v3, v5}, Landroid/view/SurfaceView;->setKeepScreenOn(Z)V

    .line 162
    :cond_0
    const v3, 0x7f0c005b

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    .line 163
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    if-eqz v3, :cond_1

    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v3}, Landroid/widget/ImageView;->getVisibility()I

    move-result v3

    const/16 v4, 0x8

    if-eq v3, v4, :cond_1

    .line 164
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-static {}, Lcom/htc/android/footprints/activity/FootprintCamera;->hasExternalStorage()Z

    move-result v4

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 165
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    new-instance v4, Lcom/htc/android/footprints/activity/FootprintCamera$1;

    invoke-direct {v4, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$1;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 186
    :cond_1
    const-string v3, "recapture"

    invoke-virtual {v0, v3, v5}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v3

    iput v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isRecaputre:I

    .line 187
    const v3, 0x7f0c0058

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    .line 190
    const v3, 0x7f0c0059

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsText:Landroid/widget/TextView;

    .line 192
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->checkLocationSources()V

    .line 194
    invoke-static {p0}, Lcom/htc/android/footprints/utils/SettingInfo;->getInstance(Landroid/content/Context;)Lcom/htc/android/footprints/utils/SettingInfo;

    move-result-object v2

    .line 195
    .local v2, setting:Lcom/htc/android/footprints/utils/SettingInfo;
    invoke-virtual {v2}, Lcom/htc/android/footprints/utils/SettingInfo;->isFirstLaunch()Z

    move-result v3

    if-eqz v3, :cond_2

    .line 196
    invoke-virtual {p0, v5}, Lcom/htc/android/footprints/activity/FootprintCamera;->showDialog(I)V

    .line 197
    invoke-virtual {v2, v5}, Lcom/htc/android/footprints/utils/SettingInfo;->setFirstLaunch(Z)V

    .line 200
    :cond_2
    invoke-static {p0}, Lcom/htc/android/footprints/utils/FootprintUtils;->getWBPreferences(Landroid/content/Context;)I

    move-result v3

    sput v3, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceDefaultIndex:I

    .line 201
    const v3, 0x7f0c005c

    invoke-virtual {p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Lcom/htc/android/footprints/view/BrightnessPanel;

    iput-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    .line 202
    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v4, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    invoke-virtual {v3, v4}, Lcom/htc/android/footprints/view/BrightnessPanel;->setCameraHandler(Landroid/os/Handler;)V

    .line 204
    const-string v3, "LAUNCH_BY_WIDGET"

    invoke-virtual {v0, v3, v5}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v3

    iput-boolean v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isLanuchByWidget:Z

    .line 207
    const-string v3, "FootprintCamera"

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "isLanuchByWidget = "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-boolean v4, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isLanuchByWidget:Z

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v6, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 210
    iget-boolean v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    if-eqz v3, :cond_3

    .line 211
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->bindLocationAgentService()V

    .line 213
    :cond_3
    return-void
.end method

.method protected onCreateDialog(I)Landroid/app/Dialog;
    .locals 6
    .parameter "id"

    .prologue
    const/4 v5, 0x0

    const v4, 0x7f0a0004

    .line 397
    packed-switch p1, :pswitch_data_0

    .line 425
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreateDialog(I)Landroid/app/Dialog;

    move-result-object v0

    :goto_0
    return-object v0

    .line 400
    :pswitch_0
    new-instance v0, Lcom/htc/android/footprints/commonui/HtcDialog;

    invoke-direct {v0, p0}, Lcom/htc/android/footprints/commonui/HtcDialog;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0}, Lcom/htc/android/footprints/commonui/HtcDialog;->getWarningDialog()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v0

    goto :goto_0

    .line 403
    :pswitch_1
    new-instance v0, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v0, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f0a0092

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    const v1, 0x1080027

    invoke-virtual {v0, v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f0a0093

    invoke-virtual {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f0a009d

    new-instance v2, Lcom/htc/android/footprints/activity/FootprintCamera$3;

    invoke-direct {v2, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$3;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    invoke-virtual {v0, v1, v2}, Lcom/htc/widget/HtcAlertDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0, v4, v5}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v0

    goto :goto_0

    .line 418
    :pswitch_2
    new-instance v0, Lcom/htc/widget/HtcAlertDialog$Builder;

    invoke-direct {v0, p0}, Lcom/htc/widget/HtcAlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f0a0083

    invoke-virtual {v0, v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->setTitle(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    const v1, 0x7f0200ad

    invoke-virtual {v0, v1}, Lcom/htc/widget/HtcAlertDialog$Builder;->setIcon(I)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceItems:[Ljava/lang/CharSequence;

    sget v2, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceDefaultIndex:I

    iget-object v3, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->whiteBalanceSelectionListener:Landroid/content/DialogInterface$OnClickListener;

    invoke-virtual {v0, v1, v2, v3}, Lcom/htc/widget/HtcAlertDialog$Builder;->setSingleChoiceItems([Ljava/lang/CharSequence;ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0, v4, v5}, Lcom/htc/widget/HtcAlertDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Lcom/htc/widget/HtcAlertDialog$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/htc/widget/HtcAlertDialog$Builder;->create()Lcom/htc/widget/HtcAlertDialog;

    move-result-object v0

    goto :goto_0

    .line 397
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
    .locals 4
    .parameter "menu"

    .prologue
    const/4 v3, 0x0

    .line 324
    sget v0, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ALL_FOOTPRINTS:I

    sget v1, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ALL_FOOTPRINTS:I

    const v2, 0x7f0a0059

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {p1, v3, v0, v1, v2}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200e0

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 327
    sget v0, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_WHITE_BALANCE:I

    sget v1, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_WHITE_BALANCE:I

    const v2, 0x7f0a0083

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {p1, v3, v0, v1, v2}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200c3

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 330
    sget v0, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_BRIGHT:I

    sget v1, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_BRIGHT:I

    const v2, 0x7f0a0084

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-interface {p1, v3, v0, v1, v2}, Landroid/view/Menu;->add(IIILjava/lang/CharSequence;)Landroid/view/MenuItem;

    move-result-object v0

    const v1, 0x7f0200c2

    invoke-interface {v0, v1}, Landroid/view/MenuItem;->setIcon(I)Landroid/view/MenuItem;

    .line 333
    const/4 v0, 0x1

    return v0
.end method

.method protected onDestroy()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 293
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 296
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/htc/android/footprints/activity/FootprintCamera;->unbindLocationAgentService(Z)V

    .line 298
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCallback:Lcom/htc/android/footprints/ILocationAgentCallback;

    .line 299
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mImageCapture:Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

    .line 300
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    .line 301
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    .line 302
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    .line 303
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    .line 304
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mIndicator:Landroid/widget/ImageView;

    .line 305
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    .line 306
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    .line 308
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    if-eqz v0, :cond_1

    .line 309
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 310
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v0}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/graphics/drawable/Drawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    .line 312
    :cond_0
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 313
    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    .line 315
    :cond_1
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 3
    .parameter "keyCode"
    .parameter "event"

    .prologue
    const/4 v2, 0x1

    .line 355
    const/16 v1, 0x17

    if-eq p1, v1, :cond_0

    const/16 v1, 0x42

    if-ne p1, v1, :cond_1

    :cond_0
    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v1

    if-nez v1, :cond_1

    .line 357
    const/4 v1, 0x0

    invoke-direct {p0, v1}, Lcom/htc/android/footprints/activity/FootprintCamera;->takePicture(Z)V

    move v1, v2

    .line 388
    :goto_0
    return v1

    .line 359
    :cond_1
    const/4 v1, 0x4

    if-ne p1, v1, :cond_5

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v1

    if-nez v1, :cond_5

    .line 360
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    invoke-virtual {v1}, Lcom/htc/android/footprints/view/BrightnessPanel;->getVisibility()I

    move-result v1

    if-nez v1, :cond_2

    .line 361
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->closeBrightnessPanel()V

    move v1, v2

    .line 362
    goto :goto_0

    .line 365
    :cond_2
    iget v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->isRecaputre:I

    if-nez v1, :cond_3

    .line 367
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_3

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v1}, Lcom/htc/android/footprints/ILocationAgentService;->stopTracking()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 374
    :cond_3
    :goto_1
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v1, :cond_4

    .line 375
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v1}, Landroid/hardware/Camera;->stopPreview()V

    .line 377
    const-wide/16 v1, 0x32

    :try_start_1
    invoke-static {v1, v2}, Ljava/lang/Thread;->sleep(J)V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_1

    .line 388
    :cond_4
    :goto_2
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v1

    goto :goto_0

    .line 368
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 369
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_1

    .line 378
    .end local v0           #e:Landroid/os/RemoteException;
    :catch_1
    move-exception v0

    .line 379
    .local v0, e:Ljava/lang/InterruptedException;
    invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V

    goto :goto_2

    .line 382
    .end local v0           #e:Ljava/lang/InterruptedException;
    :cond_5
    const/16 v1, 0x13

    if-eq p1, v1, :cond_6

    const/16 v1, 0x14

    if-eq p1, v1, :cond_6

    const/16 v1, 0x15

    if-eq p1, v1, :cond_6

    const/16 v1, 0x16

    if-ne p1, v1, :cond_4

    .line 384
    :cond_6
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v1}, Landroid/widget/ImageView;->isFocusable()Z

    move-result v1

    if-nez v1, :cond_4

    .line 385
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->takeButton:Landroid/widget/ImageView;

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setFocusable(Z)V

    goto :goto_2
.end method

.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 3
    .parameter "item"

    .prologue
    .line 338
    invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I

    move-result v1

    .line 339
    .local v1, id:I
    sget v2, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ALL_FOOTPRINTS:I

    if-ne v1, v2, :cond_1

    .line 340
    invoke-static {}, Lcom/htc/android/footprints/utils/FootprintUtils;->getResetIntent()Landroid/content/Intent;

    move-result-object v0

    .line 341
    .local v0, i:Landroid/content/Intent;
    invoke-virtual {p0, v0}, Lcom/htc/android/footprints/activity/FootprintCamera;->startActivity(Landroid/content/Intent;)V

    .line 349
    .end local v0           #i:Landroid/content/Intent;
    :cond_0
    :goto_0
    const/4 v2, 0x1

    return v2

    .line 342
    :cond_1
    sget v2, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_WHITE_BALANCE:I

    if-ne v1, v2, :cond_2

    .line 343
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->createWhiteBalanceMenu()V

    goto :goto_0

    .line 344
    :cond_2
    sget v2, Lcom/htc/android/footprints/activity/FootprintCamera;->MENU_ADJUST_BRIGHT:I

    if-ne v1, v2, :cond_0

    .line 345
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->showBrightnessPanel()V

    .line 346
    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel()V

    goto :goto_0
.end method

.method protected onPause()V
    .locals 2

    .prologue
    .line 274
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/StorageUtil;->closeStorgaeUtil()V

    .line 275
    :cond_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    invoke-virtual {v1}, Lcom/htc/android/footprints/utils/SoundPlayer;->release()V

    .line 276
    const/4 v1, 0x0

    iput-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    .line 280
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v1, :cond_1

    .line 282
    :try_start_0
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v1}, Lcom/htc/android/footprints/ILocationAgentService;->waitForPause()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 288
    :cond_1
    :goto_0
    invoke-super {p0}, Landroid/app/Activity;->onPause()V

    .line 289
    return-void

    .line 283
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 284
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method protected onResume()V
    .locals 4

    .prologue
    .line 217
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 219
    new-instance v2, Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

    const/4 v3, 0x0

    invoke-direct {v2, p0, v3}, Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;Lcom/htc/android/footprints/activity/FootprintCamera$1;)V

    iput-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mImageCapture:Lcom/htc/android/footprints/activity/FootprintCamera$ImageCapture;

    .line 221
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    if-nez v2, :cond_0

    .line 222
    new-instance v2, Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->getApplicationContext()Landroid/content/Context;

    move-result-object v3

    invoke-direct {v2, v3}, Lcom/htc/android/footprints/utils/StorageUtil;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    .line 223
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    new-instance v3, Lcom/htc/android/footprints/activity/FootprintCamera$2;

    invoke-direct {v3, p0}, Lcom/htc/android/footprints/activity/FootprintCamera$2;-><init>(Lcom/htc/android/footprints/activity/FootprintCamera;)V

    invoke-virtual {v2, v3}, Lcom/htc/android/footprints/utils/StorageUtil;->SetOnChangeStorageListerner(Lcom/htc/android/footprints/utils/StorageUtil$OnChangeStorageListener;)V

    .line 247
    :cond_0
    new-instance v2, Lcom/htc/android/footprints/utils/SoundPlayer;

    invoke-direct {v2, p0}, Lcom/htc/android/footprints/utils/SoundPlayer;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSound:Lcom/htc/android/footprints/utils/SoundPlayer;

    .line 249
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    if-eqz v2, :cond_1

    .line 250
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStorageUtil:Lcom/htc/android/footprints/utils/StorageUtil;

    invoke-virtual {v2}, Lcom/htc/android/footprints/utils/StorageUtil;->startStorageUtil()V

    .line 253
    :cond_1
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-eqz v2, :cond_2

    .line 254
    const-string v2, "FootprintCamera"

    const-string v3, "mService.resume() at onResume"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 256
    :try_start_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    invoke-interface {v2}, Lcom/htc/android/footprints/ILocationAgentService;->resume()V
    :try_end_0
    .catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_0

    .line 262
    :cond_2
    :goto_0
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->backFromSettings:Z

    if-eqz v2, :cond_3

    .line 263
    const/4 v2, 0x0

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->backFromSettings:Z

    .line 264
    const-string v2, "location"

    invoke-virtual {p0, v2}, Lcom/htc/android/footprints/activity/FootprintCamera;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/location/LocationManager;

    .line 265
    .local v1, service:Landroid/location/LocationManager;
    const-string v2, "gps"

    invoke-virtual {v1, v2}, Landroid/location/LocationManager;->isProviderEnabled(Ljava/lang/String;)Z

    move-result v2

    iput-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    .line 266
    iget-boolean v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->gpsEnabled:Z

    if-eqz v2, :cond_3

    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mService:Lcom/htc/android/footprints/ILocationAgentService;

    if-nez v2, :cond_3

    .line 267
    invoke-direct {p0}, Lcom/htc/android/footprints/activity/FootprintCamera;->bindLocationAgentService()V

    .line 270
    .end local v1           #service:Landroid/location/LocationManager;
    :cond_3
    return-void

    .line 257
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 258
    .local v0, e:Landroid/os/RemoteException;
    invoke-virtual {v0}, Landroid/os/RemoteException;->printStackTrace()V

    goto :goto_0
.end method

.method public resetBrightnessPanel()V
    .locals 4

    .prologue
    .line 841
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    .line 842
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->resetBrightnessPanel:Ljava/lang/Runnable;

    const-wide/16 v2, 0xbb8

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 843
    return-void
.end method

.method public showBrightnessPanel()V
    .locals 3

    .prologue
    .line 831
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 832
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mHandler:Landroid/os/Handler;

    invoke-virtual {v0, v1, v2}, Lcom/htc/android/footprints/view/BrightnessPanel;->init(Landroid/hardware/Camera;Landroid/os/Handler;)V

    .line 833
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mBrightPanel:Lcom/htc/android/footprints/view/BrightnessPanel;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/htc/android/footprints/view/BrightnessPanel;->showBrightPanel(I)V

    .line 835
    :cond_0
    return-void
.end method

.method public surfaceChanged(Landroid/view/SurfaceHolder;III)V
    .locals 2
    .parameter "holder"
    .parameter "format"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 741
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    invoke-virtual {v1}, Landroid/view/SurfaceView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    .line 742
    .local v0, lp:Landroid/view/ViewGroup$LayoutParams;
    iput p3, v0, Landroid/view/ViewGroup$LayoutParams;->width:I

    .line 743
    iput p4, v0, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 744
    iget-object v1, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mSurfaceView:Landroid/view/SurfaceView;

    invoke-virtual {v1}, Landroid/view/SurfaceView;->requestLayout()V

    .line 746
    return-void
.end method

.method public surfaceCreated(Landroid/view/SurfaceHolder;)V
    .locals 4
    .parameter "holder"

    .prologue
    const/16 v3, 0xf0

    .line 749
    const/4 v2, 0x0

    invoke-interface {p1, v2}, Landroid/view/SurfaceHolder;->setKeepScreenOn(Z)V

    .line 751
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-nez v2, :cond_0

    .line 752
    invoke-static {}, Landroid/hardware/Camera;->open()Landroid/hardware/Camera;

    move-result-object v2

    iput-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    .line 757
    :cond_0
    :try_start_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v2, p1}, Landroid/hardware/Camera;->setPreviewDisplay(Landroid/view/SurfaceHolder;)V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    .line 761
    :goto_0
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v2}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v1

    .line 763
    .local v1, p:Landroid/hardware/Camera$Parameters;
    invoke-virtual {v1, v3, v3}, Landroid/hardware/Camera$Parameters;->setPreviewSize(II)V

    .line 764
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v2, v1}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V

    .line 766
    iget-object v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v2}, Landroid/hardware/Camera;->startPreview()V

    .line 767
    const/4 v2, 0x1

    iput v2, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    .line 768
    return-void

    .line 758
    .end local v1           #p:Landroid/hardware/Camera$Parameters;
    :catch_0
    move-exception v2

    move-object v0, v2

    .line 759
    .local v0, e:Ljava/io/IOException;
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method public surfaceDestroyed(Landroid/view/SurfaceHolder;)V
    .locals 1
    .parameter "holder"

    .prologue
    .line 771
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 772
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    .line 773
    iget-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->release()V

    .line 774
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mCameraDevice:Landroid/hardware/Camera;

    .line 776
    :cond_0
    const/4 v0, 0x0

    iput v0, p0, Lcom/htc/android/footprints/activity/FootprintCamera;->mStatus:I

    .line 777
    return-void
.end method
